$OpenBSD: patch-source_Makefile,v 1.2 2015/04/07 10:10:28 stsp Exp $
--- source/Makefile.orig	Thu Aug 28 04:28:56 2014
+++ source/Makefile	Mon Apr  6 15:44:58 2015
@@ -591,8 +591,8 @@ ifndef BUILD_LUA
       BUILD_LUA = yes
     endif
   else
-    ifneq ($(shell $(PKGCONFIG) lua5.1 --exists || echo no),)
-      ifneq ($(shell $(PKGCONFIG) lua-5.1 --exists || echo no),)
+    ifneq ($(shell $(PKGCONFIG) lua${MODLUA_DEP_VERSION} --exists || echo no),)
+      ifneq ($(shell $(PKGCONFIG) lua-${MODLUA_DEP_VERSION} --exists || echo no),)
         ifneq ($(shell $(PKGCONFIG) lua --exists || echo no),)
           BUILD_LUA = yes
         else
@@ -603,16 +603,16 @@ ifndef BUILD_LUA
           endif
         endif
       else
-        LUA_PACKAGE = lua-5.1
+        LUA_PACKAGE = lua-${MODLUA_DEP_VERSION}
       endif
     else
-      LUA_PACKAGE = lua5.1
+      LUA_PACKAGE = lua${MODLUA_DEP_VERSION}
     endif
   endif
 endif
 ifndef BUILD_LUA
   ifndef LUA_PACKAGE
-    LUA_PACKAGE = lua5.1
+    LUA_PACKAGE = lua${MODLUA_DEP_VERSION}
   endif
   INCLUDES_L += $(shell $(PKGCONFIG) $(LUA_PACKAGE) --cflags-only-I | sed -e 's/-I/-isystem /')
   CFLAGS_L  += $(shell $(PKGCONFIG) $(LUA_PACKAGE) --cflags-only-other)
